// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'
import http from './utils/http'
import {BASE_SERVER_URL} from './utils/config'
// 全局过滤器
import * as filter from './filter'
Object.keys(filter).forEach(key => {
  Vue.filter(key, filter[key])
})
// Element ui
import ElementUI from 'element-ui'
import '@/assets/fonts/iconfont.css'
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/scss/index.scss'
// promise 解决兼容性问题
// import Es6Promise from 'es6-promise'
// Es6Promise.polyfill()
Vue.use(ElementUI)
Vue.prototype.$http = http
Vue.prototype.$serverUrl = BASE_SERVER_URL
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
